package com.example.messengerapp.repository

import com.example.messengerapp.model.AuthResult

class AuthRepository {

    fun login(email: String, password: String): AuthResult {
        return if (email == "test@example.com" && password == "password") {
            AuthResult(success = true)
        } else {
            AuthResult(success = false, errorMessage = "Invalid email or password")
        }
    }

    fun register(email: String, password: String): AuthResult {
        return if (email.isNotEmpty() && password.length >= 6) {
            AuthResult(success = true)
        } else {
            AuthResult(success = false, errorMessage = "Invalid email or password")
        }
    }
}
